<script setup lang="ts">
import { ref } from 'vue'
import HealthKnowledgeBase from './components/HealthKnowledgeBase.vue'
import PopulationCare from './components/PopulationCare.vue'
import PreDiseaseManagement from './components/PreDiseaseManagement.vue'

const activeTab = ref('1')
</script>

<template>
  <div class="health-plan-container">
    <div class="nav-search-wrapper">
      <el-tabs v-model="activeTab" class="nav-tabs">
        <el-tab-pane label="治未病管理" name="1">
          <HealthKnowledgeBase />
        </el-tab-pane>
        <el-tab-pane label="人群关怀" name="2">
          <PopulationCare />
        </el-tab-pane>
        <el-tab-pane label="健康知识库" name="3">
          <PreDiseaseManagement />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<style scoped lang="scss">
.health-plan-container {
  padding: 20px;
}

.nav-search-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  background-color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.nav-tabs {
  flex: 1;
  :deep(.el-tabs__header) {
    margin: 0;
  }

  :deep(.el-tabs__nav-wrap::after) {
    display: none;
  }

  :deep(.el-tabs__item) {
    font-size: 16px;
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    
    &.is-active {
      color: var(--el-color-primary);
      font-weight: 500;
    }
    
    &:hover {
      color: var(--el-color-primary);
    }
  }
}

</style>
